package galaxy.drawer.action;

import galaxy.drawer.Context;

public class LeafAction implements Action {
	private Action filtered;
	
	public LeafAction(Action filtered)
	{
		this.filtered = filtered;
	}
	
	public Context execute(Context c) {
		if (!c.node.hasChildren()) {
			return filtered.execute(c);
		}
		return c;
	}
}
